﻿@using BootstrapBlazor.Components
@using Microsoft.Extensions.Localization
@using ThingsGateway.Extension
@using ThingsGateway.Foundation
@using ThingsGateway.Admin.Application
@using ThingsGateway.Admin.Razor
@using ThingsGateway.Gateway.Application
@using ThingsGateway.Plugin.OpcUa
@namespace ThingsGateway.Plugin.OpcUa


<ValidateForm Model="Model.Value"
              @key=@($"DeviceEditValidateForm{Id}{Model.Value.GetType().TypeHandle.Value}")
              @ref=Model.ValidateForm
              Id=@($"DeviceEditValidateForm{Id}{Model.Value.GetType().TypeHandle.Value}")>

    <EditorFormObject class="p-2" Items=PluginPropertyEditorItems IsDisplay="!CanWrite" AutoGenerateAllItem="false" RowType=RowType.Inline ItemsPerRow=@(CanWrite?2:3) ShowLabelTooltip=true LabelWidth=@(CanWrite?240:120) Model="Model.Value" ShowLabel="true" @key=@($"DeviceEditEditorFormObject{Id}{Model.Value.GetType().TypeHandle.Value}")>

        <Buttons>
            <Button IsAsync class="mx-2" Color=Color.Primary OnClick="Export">@Localizer["ExportC"]</Button>
        </Buttons>
    </EditorFormObject>
</ValidateForm>


